import { postData, getData, putData, deleteData } from '../api'

// 登录
export const login = async (data: { userTelno: string, userPwd: string }) => {
  let res = await postData('/users/login', data)
  return res
}

// 退出登录
export const logout = async () => {
  let res = await postData('/users/logout', {})
  return res
}

// 注册
export const register = async (data: { username: string, email: string, phone: string, password: string }) => {
  let res = await postData('/users/register', data)
  return res
}

// 获取用户信息
export const getUserInfo = async () => {
  let res = await getData('/personal/info')
  return res
}
